package com.sz.model;

import java.util.List;

public class PageBeanType<T> {
    private long total ; //所有记录行数;
    private List<T> rows ;  //当前页的数据;
    private Integer pageSize ;  //每页几条;
    private Integer pageTotals ;  //一共多少页 ;
    private Integer pageIndex ; //第几页;

    public long getTotal() {
        return total;
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "total=" + total +
                ", rows=" + rows +
                ", pageSize=" + pageSize +
                ", pageTotals=" + pageTotals +
                ", pageIndex=" + pageIndex +
                '}';
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageTotals() {
        return pageTotals;
    }

    public void setPageTotals(Integer pageTotals) {
        this.pageTotals = pageTotals;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public PageBeanType(long total, List<T> rows, Integer pageSize, Integer pageTotals, Integer pageIndex) {

        this.total = total;
        this.rows = rows;
        this.pageSize = pageSize;
        this.pageTotals = pageTotals;
        this.pageIndex = pageIndex;
    }

    public PageBeanType() {

    }
}
